home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10933 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: salvucci.avid.com!user
  2. From: an340729@anon.penet.fi (HighRoller)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Visual C++ memory
  5. Date: Mon, 11 Mar 1996 14:49:09 -0500
  6. Organization: HighRoller's anonymous
  7. Message-ID: <an340729-1103961449090001@salvucci.avid.com>
  8. References: <4i06pl$ret@crash.microserve.net>
  9. NNTP-Posting-Host: salvucci.avid.com
  10. X-Newsreader: Yet Another NewsWatcher 2.0.1
  11.  
  12. Where are you storing the text?  If you are using a large file, make sure
  13. you store in the heap and not on the stack.  And when you do your
  14. allocation, make sure that you really got the allocation (check the result
  15. from ::new() or malloc() or whatever).
  16.  
  17. If that doesn't help, copy the lines of source code up here pointing out
  18. the line at which it barfs and let's see.  
  19.  
  20. In article <4i06pl$ret@crash.microserve.net>, ada105@psu.edu wrote:
  21.  
  22. ::   Hi all,
  23. ::    I'm having  little problem with visual C++ for windows and I was
  24. ::wondering if anyone out the could help me.  I'm writing a program
  25. ::which needs to read information from text files into memory.  I have
  26. ::the program written to read it, and it works fine for a small amout of
  27. ::reading, but after it reads for a second in a big file, it gives me an
  28. ::out of memory error.  I looked it over and I though it might have been
  29. ::because I was using the medium memory model, so I tried switching to
  30. ::large.  Then, the program gave me a error that an ASSERT statement had
  31. ::failed in the "filecore.cpp" file.  Can someone help me out with this?
  32. ::I'm just really starting and I'm not quite sure how to get around this
  33. ::one.  I have Charles Petzold's Windows Programming and the book Inside
  34. ::Visual C++ if you can refer me to anything in those that might do it,
  35. ::but I couldn't find anything.  I'd really appreciate any help you
  36. ::could give me, thanks!
  37. ::
  38. ::   Alex(ada105@psu.edu)
  39.